package cn.kailangtu.myapplication.tools;

import android.content.Context;

public  class APPSPUtils {
    private static APPSPUtils instance;
    /*
     * 单例模式创建
     * */
    public static APPSPUtils getInstance() {
        if (instance == null) {
            instance = new APPSPUtils();
        }
        return instance;
    }

    private Context context ;
    public void init(Context context){
       this.context = context;
    }



    private final String 行驶里程 = "行驶里程";
    public float get行驶里程()
    {
        return SmSPUtils.getInstance("",context).getFloat(行驶里程,0f);
    }
    public void set行驶里程(float value)
    {
        SmSPUtils.getInstance("",context).put(行驶里程,value);
    }

    private final String 串口号  = "串口号";
    public String get串口号()
    {
        return SmSPUtils.getInstance("",context).getString(串口号,"/dev/ttyS2");
    }
    public void set串口号(String value)
    {
        SmSPUtils.getInstance("",context).put(串口号,value);
    }


}
